<?php

/**
 * Created by PhpStorm.
 * User: steven
 * Date: 2016/3/25
 * Time: 19:31
 */
class Court_Model extends CI_Model
{
    public function __construct()
    {
        $this->load->database();
    }


    public function get_all_courts(){
        $sql="select * from court where is_deleted='N'";
        $query=$this->db->query($sql);
        return $query->result_array();
    }

    public function get_courts_by_region($region_id){
        $sql="select * from court_pic WHERE is_deleted='N' and region_id='".$region_id."'";
        $query=$this->db->query($sql);
        return $query->result_array();
    }
}